package com.neuedu.nevserver.config;

import ch.qos.logback.classic.pattern.DateConverter;
import com.neuedu.nevserver.utils.StringToDateConvter;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: sjy
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    /**
     * 配置日期类型转换组件
     * @param registry
     */
    @Override
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverter(new StringToDateConvter());
    }

}
